<?php

function __autoload( $s )
{
    if( strpos( $s, "Exception" ) !== false )
    {
        eval("class " . $s . " extends Exception {}");
    }
    
    $s = str_replace('CouchPHP\\','',$s);
    $s = str_replace('\\','/',$s);
    require_once strtolower($s) . '.php';
}